package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.service.CustomerBillService;
import com.ruoyi.service.FinanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 库内操作界面'客户账单'的三个按钮

 */
@RestController
@RequestMapping("/amac/customerBill")
public class CustomerBillController extends BaseController {

    @Autowired
    private CustomerBillService customerBillService;

    /**
     * 客户的成本计算 01-19版本
     * @param response
     * @param costFile
     * @param detailsFile
     * @param updateSupport
     * @throws Exception
     */
    @PostMapping("/customerCost")
    public void customerCost( HttpServletResponse response,MultipartFile costFile,MultipartFile detailsFile, boolean updateSupport) throws Exception {
        customerBillService.customerCost(response,costFile,detailsFile,updateSupport);

    }
    @PostMapping("/customerCostStandard")
    public void customerCostStandard( HttpServletResponse response,MultipartFile costFile,MultipartFile detailsFile, boolean updateSupport) throws Exception {
        customerBillService.customerCostStandard(response,costFile,detailsFile,updateSupport);

    }
    @PostMapping("/customerCostVip")
    public void customerCostVip( HttpServletResponse response,MultipartFile costFile,MultipartFile detailsFile, boolean updateSupport) throws Exception {
        customerBillService.customerCostVip(response,costFile,detailsFile,updateSupport);

    }
    /**
     * 客户成本模板导出
     * @param response
     * @throws Exception
     */
    @PostMapping("/customerCostTemplate")
    public void exportCustomerCostTemplate(HttpServletResponse response) throws Exception {
        customerBillService.exportCustomerCostTemplate(response);
    }


}
